package cj.web.yc.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cj.web.yc.dao.PayHistoryDAO;
import cj.web.yc.domain.PayHistory;

@Service
public class PayHistoryService {

	@Autowired
    private PayHistoryDAO payHistoryDAO;
	
	/**
	 * 查询
	 * @param payHistory
	 * @return payHistorylis;size
	 */
	public Map query(PayHistory payHistory){
		Map rep = new HashMap();
		List<PayHistory> payHistorylis = payHistoryDAO.query(payHistory);
		int size = payHistoryDAO.querySize(payHistory); 
		rep.put("payHistorylis", payHistorylis);
		rep.put("size", size);
		return rep;
    }
	
	public PayHistory queryById(int id){
		PayHistory obj = payHistoryDAO.queryById(id);
		return obj;
    }
	
	public void create(PayHistory payHistory){
		payHistoryDAO.create(payHistory);
	}
}